home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / hardware / dat / README < prev   
Text File  |  1994-08-01  |  3KB  |  74 lines

  1.  
  2.                  ~4Dgifts/toolbox/hardware/DATdriver README
  3.  
  4.               A Sample User_Level SCSI DAT driver
  5.                   -----------------------------------
  6.  
  7. Disclaimer notice:
  8. ------------------
  9.         This sample driver is for provided to give you an example of 
  10.     how to use dslib routines.  It is NOT the aim of this driver to 
  11.     replace the tape driver in IRIX nor it is to be used INSTEAD of 
  12.     that driver.  It is simply a working user-level driver to be used
  13.     and studied as an example of interfacing with the Scsi bus 
  14.     through routines in the dslib library.
  15.  
  16.  
  17. Introduction:
  18. -------------
  19.         Scsi support for Indigo-2 is very modular and layered.  One 
  20.     way to interface with the Scsi controller and pass Scsi commands
  21.     to a device is by writing a kernel-level device driver.  A 
  22.     simpler and more portable way is through a user-level device 
  23.     driver.  To make writing a user-level device driver easier, SGI 
  24.     provides you with a set of library routines that interface with 
  25.     the kernel-level controller drivers on behalf of your application 
  26.     and passes the Scsi commands you provide it to the device.  This 
  27.     sample driver shows you how to:
  28.  
  29.                 - Load and Unload the tape
  30.                 - find out the tape format (single or double part).
  31.                 - find out tape capacity.
  32.                 - partition a tape
  33.                 - switch partitions on the tape
  34.                 - change default tape block
  35.                 - Read and Write from/to the tape
  36.                 - move forward and backward
  37.                  ... and many more
  38.  
  39.         We have provided a simple directory structure and we store
  40.     and retrieve files individully.  The format of this structure and
  41.     partitions on the tape are fully explained in the begiining of 
  42.     the dat.c file. 
  43.  
  44. Files provided:
  45. ---------------
  46.         You should have the following files:
  47.  
  48.         - dat.c:      The sample driver's source code
  49.         - Makefile:  The makefile to compile the code. 
  50.  
  51.         To compile the driver, locate the libds.a library.  It
  52.     should be in /usr/lib directory and is installed from the 
  53.     dev.sw.lib subsystem.  This library contains the dslib routine.
  54.     If you have this directory somewhere else, change the line
  55.     "LLDLIBS = -lds" in Makefile to be appropriate for where libds.a
  56.     is located on your system. Then type:
  57.  
  58.         make dat
  59.  
  60.         Now you shoud have the user-level driver 'dat' ready to run.
  61.     To run the program, identify the DAT tape driver /dev entry (Most 
  62.     likely it is: /dev/scsi/sc0d2l0: Controller 0, Device 2, Lu0). 
  63.     Run the program as:
  64.  
  65.         dat /dev/sc0d2l0
  66.  
  67.  
  68.         Have some file (ascii or non-ascii) ready to copy to the
  69.     tape and retrieve them back. You maye uncomment the line 
  70.  
  71.                 /*  dsdebug |= (1 | 2);  */
  72.  
  73.     to see what dslib reports back to study the interface.
  74.